﻿#region Using
using System;
using System.Runtime.Serialization;

#endregion Using

namespace NetBay.Core.BusinessEntities.Barcodes
{
    [DataContract]
    [KnownType(typeof(BarcodeSeparator))]
    public class BarcodeFolderSeparator : BarcodeSeparator
    {
        #region Attributs
        private BarcodeSeparatorType _BarcodeSeparatorType = BarcodeSeparatorType.FolderSeparator;

        #endregion Attributs

        #region Properties

        /// <summary>
        /// Gets or sets the unique index identifier.
        /// </summary>
        /// <value>The unique index identifier.</value>
        [DataMember]
        public Nullable<long> UniqueIndexIdentifier { get; set; }

        /// <summary>
        /// Gets or sets the unique index label.
        /// </summary>
        /// <value>The unique index label.</value>
        [DataMember]
        public string UniqueIndexLabel { get; set; }

        /// <summary>
        /// Gets or sets the index value.
        /// </summary>
        /// <value>The index value.</value>
        [DataMember]
        public string RecognizedIndexValue { get; set; }

        /// <summary>
        /// Gets or sets the index value error.
        /// </summary>
        /// <value>The index value error.</value>
        [DataMember]
        public Boolean RecognizedUniqueIndexValue { get; set; }

        /// <summary>
        /// Gets or sets the Barcode correspondence folder.
        /// </summary>
        /// <value>The Barcode correspondence folder.</value>
        [DataMember]
        public bool CorrespondenceFolder { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder unique index id.
        /// </summary>
        /// <value>The Barcode separatror folder unique index id.</value>
        [DataMember]
        public long IndexId { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder unique index start caratctere.
        /// </summary>
        /// <value>The Barcode separatror folder unique index start caratctere.</value>
        [DataMember]
        public int StartChar { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder unique index end caratctere.
        /// </summary>
        /// <value>The Barcode separatror folder unique index end caratctere.</value>
        [DataMember]
        public int EndChar { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder page limit.
        /// </summary>
        /// <value>The Barcode separatror folder page limit.</value>
        [DataMember]
        public bool PageLimit { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder document limit.
        /// </summary>
        /// <value>The Barcode separatror folder document limit.</value>
        [DataMember]
        public bool DocumentLimit { get; set; }

        /// <summary>
        /// Gets or sets the type of barcode.
        /// </summary>
        /// <value>The type of barcode.</value>
        [DataMember]
        public override BarcodeSeparatorType TypeOfBarcode
        {
            get
            {
                return _BarcodeSeparatorType;
            }
            set
            {
                _BarcodeSeparatorType = value;
            }
        }

        #endregion Properties      
        
        #region Init/Constructor
        
        /// <summary>
        /// Initializes a new instance of the <see cref="BarcodeDocumentSeparator" /> class.
        /// </summary>
        public BarcodeFolderSeparator()
        {
        }

        /// <summary>
        /// Only for error
        /// </summary>
        /// <param name="ErrorMessage"></param>
        public BarcodeFolderSeparator(string errorMessage, Exception applicationException = null)
        : base(errorMessage, applicationException)
        {
        }

        #endregion

        public override object Clone()
        {
            return this.MemberwiseClone();
        }
    }
}